<template>
  <!-- 订阅方式组件 -->
  <div class="top_subscribe_way">
    <div class="list_tips" @click="subscribeTip">
      订阅提醒
      <img src="../../assets/images/question@3x.png" alt="" />
    </div>
    <div @click="setSubWay()">
      <span>订阅方式</span>
      <img src="../../assets/images/icon_forward@2x.png" alt="" />
    </div>
  </div>
</template>

<script>
import Subscribe from './Subscribe';
import { stopBodyScroll } from '../../utils/index';
export default {
  name: 'SubscribeWay',
  data() {
    return {
      isShow: false,
    };
  },
  components: {
    Subscribe,
  },
  methods: {
    subscribeTip() {
      stopBodyScroll();
      this.$dialog({
        content:
          '为了投资风格的一致性，避免频繁操作，股票池的订阅上限位3个；订阅对应股票池后，方可继续跟踪对应的股票，跟踪的股票数量上限为5个，订阅股票后，系统将对该个股进行跟踪提醒。',
        btns: [
          {
            text: '我知道了',
            callback: () => {
              stopBodyScroll();
            },
          },
        ],
      });
    },
    setSubWay() {
      this.$emit('changeStatus', {
        showStatus: !this.isShow,
        setGray: true,
      });
    },
  },
};
</script>

<style lang="less" scoped>
.top_subscribe_way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.28rem;
  width: 100%;
  div:nth-child(2) {
    margin-top: 2%;
    color: #666666;
  }
  img {
    margin-right: 0.2rem;
    height: 0.4rem;
    width: 0.4rem;
  }
}
.list_tips {
  font-size: 0.32rem;
  font-weight: bold;
  height: 0.8rem;
  line-height: 0.8rem;
  margin-left: 3.2%;
  margin-top: 2%;
  img {
    width: 0.3rem;
    height: 0.3rem;
  }
}
[theme-mode='black'] .top_subscribe_way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.28rem;
  color: #d2d2d3;
  width: 100%;
  div:nth-child(2) {
    margin-top: 2%;
    color: #d2d2d3;
  }
  img {
    margin-right: 0.2rem;
    height: 0.4rem;
    width: 0.4rem;
  }
}
[theme-mode='black'] .list_tips {
  font-size: 0.32rem;
  font-weight: bold;
  height: 0.8rem;
  line-height: 0.8rem;
  margin-left: 3.2%;
  margin-top: 2%;
  img {
    width: 0.3rem;
    height: 0.3rem;
  }
}
</style>
